home *** CD-ROM | disk | FTP | other *** search
/ STraTOS 1997 April & May / STraTOS 1 - 1997 April & May.iso / CD01 / INTERNET / SITES / GRAHAM / XAAES_S.ZIP / XAAES / BOX3D.C < prev    next >
Encoding:
C/C++ Source or Header  |  1996-02-27  |  1.9 KB  |  84 lines

  1. /*
  2.  * XaAES - XaAES Ain't the AES
  3.  *
  4.  * A multitasking AES replacement for MiNT
  5.  *
  6.  */
  7.  
  8. #include <VDI.H>
  9. #include "XA_TYPES.H"
  10. #include "XA_GLOBL.H"
  11.  
  12. void XA_3D_rect(short x, short y, short w, short h, short b, short b1)
  13. {
  14.     short pnt[10];
  15.     
  16.     vsf_color(V_handle,display.dial_colours.bg_col);
  17.     vsf_interior(V_handle,FIS_SOLID);        /* Select solid fills - maybe make this an option? */
  18.     pnt[0]=x; pnt[1]=y; pnt[2]=x+w; pnt[3]=y+h;
  19.     v_bar(V_handle,pnt);
  20.  
  21.     vsl_color(V_handle,display.dial_colours.b_r_col);
  22.  
  23.     pnt[0]=x+b; pnt[1]=y+h-b;
  24.     pnt[2]=x+b; pnt[3]=y+b;
  25.     pnt[4]=x+w-b; pnt[5]=y+b;
  26.     v_pline(V_handle,3,pnt);
  27.     
  28.     pnt[0]=x+b+4; pnt[1]=y+h-b-1;
  29.     pnt[2]=x+w-b-1; pnt[3]=y+h-b-1;
  30.     pnt[4]=x+w-b-1; pnt[5]=y+b+1;
  31.     v_pline(V_handle,3,pnt);
  32.     
  33.     vsl_color(V_handle,display.dial_colours.t_l_col);
  34.  
  35.     pnt[0]=x+w-b; pnt[1]=y+b+1;
  36.     pnt[2]=x+w-b; pnt[3]=y+h-b;
  37.     pnt[4]=x+b+1; pnt[5]=y+h-b;
  38.     v_pline(V_handle,3,pnt);
  39.     
  40.     pnt[0]=x+b+1; pnt[1]=y+h-b-1;
  41.     pnt[2]=x+b+1; pnt[3]=y+b+1;
  42.     pnt[4]=x+w-b-1; pnt[5]=y+b+1;
  43.     v_pline(V_handle,3,pnt);
  44.     
  45.     if (!b1) return;
  46.     
  47.     vsl_color(V_handle,display.dial_colours.border_col);
  48.     pnt[0]=x; pnt[1]=y;
  49.     pnt[2]=x+w; pnt[3]=y;
  50.     pnt[4]=x+w; pnt[5]=y+h;
  51.     pnt[6]=x; pnt[7]=y+h;
  52.     pnt[8]=x; pnt[9]=y;
  53.     v_pline(V_handle,5,pnt);
  54. }
  55.  
  56. void XA_3D_pushbutton(short x, short y, short w, short h, short selected)
  57. {
  58.     short pnt[6];
  59.  
  60.     pnt[0]=x; pnt[1]=y;
  61.     pnt[2]=x+w; pnt[3]=y+h;
  62.     v_bar(V_handle, pnt);
  63.  
  64.     if (selected)
  65.         vsl_color(V_handle,display.dial_colours.b_r_col);
  66.     else
  67.         vsl_color(V_handle,display.dial_colours.t_l_col);
  68.  
  69.     pnt[0]=x; pnt[1]=y+h;
  70.     pnt[2]=x; pnt[3]=y;
  71.     pnt[4]=x+w; pnt[5]=y;
  72.     v_pline(V_handle,3,pnt);
  73.  
  74.     if (selected)
  75.         vsl_color(V_handle,display.dial_colours.t_l_col);
  76.     else
  77.         vsl_color(V_handle,display.dial_colours.b_r_col);
  78.  
  79.     pnt[0]=x+1; pnt[1]=y+h;
  80.     pnt[2]=x+w; pnt[3]=y+h;
  81.     pnt[4]=x+w; pnt[5]=y+1;
  82.     v_pline(V_handle,3,pnt);
  83. }
  84.